package com.lxitedu.container;

import java.io.InputStream;

import com.jenkov.container.Container;
import com.jenkov.container.IContainer;
import com.jenkov.container.script.ScriptFactoryBuilder;

@SuppressWarnings("deprecation")
public class ContainerUtils {
  private static IContainer           container     = new Container();
  private static ScriptFactoryBuilder scriptBuilder = new ScriptFactoryBuilder(
      container);

  static {
    InputStream inputStream = Thread.currentThread().getContextClassLoader()
    .getResourceAsStream("com/lxitedu/container/beanConfig.txt");
    scriptBuilder.addFactories(inputStream);
  }

  public static IContainer getContainer() {
    return container;
  }
}
